<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::SocketCAN Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_socket_c_a_n.html">SocketCAN</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibemb_1_1_socket_c_a_n-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::SocketCAN Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>CAN套接字  
 <a href="classlibemb_1_1_socket_c_a_n.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_socket_8h_source.html">Socket.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for libemb::SocketCAN:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classlibemb_1_1_socket_c_a_n.png" usemap="#libemb::SocketCAN_map" alt=""/>
  <map id="libemb::SocketCAN_map" name="libemb::SocketCAN_map">
<area href="classlibemb_1_1_socket.html" title="Socket抽象基类" alt="libemb::Socket" shape="rect" coords="0,0,119,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a96672c6ab59aa802b89dec841e06e3cf"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#a96672c6ab59aa802b89dec841e06e3cf">interface</a> ()</td></tr>
<tr class="memdesc:a96672c6ab59aa802b89dec841e06e3cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取接口名称  <a href="classlibemb_1_1_socket_c_a_n.html#a96672c6ab59aa802b89dec841e06e3cf">More...</a><br /></td></tr>
<tr class="separator:a96672c6ab59aa802b89dec841e06e3cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d22e63de72acc671b452f13890471bf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#a9d22e63de72acc671b452f13890471bf">open</a> (std::string canName=&quot;&quot;, <a class="el" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort=0)</td></tr>
<tr class="memdesc:a9d22e63de72acc671b452f13890471bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开套接字  <a href="classlibemb_1_1_socket_c_a_n.html#a9d22e63de72acc671b452f13890471bf">More...</a><br /></td></tr>
<tr class="separator:a9d22e63de72acc671b452f13890471bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af29500cf81996e67ceaf210fa80c4e33"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#af29500cf81996e67ceaf210fa80c4e33">close</a> ()</td></tr>
<tr class="memdesc:af29500cf81996e67ceaf210fa80c4e33"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭套接字  <a href="classlibemb_1_1_socket_c_a_n.html#af29500cf81996e67ceaf210fa80c4e33">More...</a><br /></td></tr>
<tr class="separator:af29500cf81996e67ceaf210fa80c4e33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32a48b875a74cf0571f8d3a841a0271b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#a32a48b875a74cf0571f8d3a841a0271b">recvFrame</a> (<a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;canFrame, int usTimeout=-1)</td></tr>
<tr class="memdesc:a32a48b875a74cf0571f8d3a841a0271b"><td class="mdescLeft">&#160;</td><td class="mdescRight">接收帧  <a href="classlibemb_1_1_socket_c_a_n.html#a32a48b875a74cf0571f8d3a841a0271b">More...</a><br /></td></tr>
<tr class="separator:a32a48b875a74cf0571f8d3a841a0271b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd41e727984c489b7e401e3f8cffeba5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#acd41e727984c489b7e401e3f8cffeba5">sendFrame</a> (<a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;canFrame, int usTimeout=-1)</td></tr>
<tr class="memdesc:acd41e727984c489b7e401e3f8cffeba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送帧  <a href="classlibemb_1_1_socket_c_a_n.html#acd41e727984c489b7e401e3f8cffeba5">More...</a><br /></td></tr>
<tr class="separator:acd41e727984c489b7e401e3f8cffeba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96f512a12482408448c8c7d6dfbbc5d3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#a96f512a12482408448c8c7d6dfbbc5d3">readFrame</a> (<a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;canFrame)</td></tr>
<tr class="memdesc:a96f512a12482408448c8c7d6dfbbc5d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取帧  <a href="classlibemb_1_1_socket_c_a_n.html#a96f512a12482408448c8c7d6dfbbc5d3">More...</a><br /></td></tr>
<tr class="separator:a96f512a12482408448c8c7d6dfbbc5d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a086ee3480de9f5d0cf8bc3cf93ffb676"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket_c_a_n.html#a086ee3480de9f5d0cf8bc3cf93ffb676">writeFrame</a> (<a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;canFrame)</td></tr>
<tr class="memdesc:a086ee3480de9f5d0cf8bc3cf93ffb676"><td class="mdescLeft">&#160;</td><td class="mdescRight">写入帧  <a href="classlibemb_1_1_socket_c_a_n.html#a086ee3480de9f5d0cf8bc3cf93ffb676">More...</a><br /></td></tr>
<tr class="separator:a086ee3480de9f5d0cf8bc3cf93ffb676"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlibemb_1_1_socket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlibemb_1_1_socket')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlibemb_1_1_socket.html">libemb::Socket</a></td></tr>
<tr class="memitem:adfdf7df8816e636aa1803d502b7451eb inherit pub_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#adfdf7df8816e636aa1803d502b7451eb">readData</a> (char *buf, int len)</td></tr>
<tr class="memdesc:adfdf7df8816e636aa1803d502b7451eb inherit pub_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取数据  <a href="classlibemb_1_1_socket.html#adfdf7df8816e636aa1803d502b7451eb">More...</a><br /></td></tr>
<tr class="separator:adfdf7df8816e636aa1803d502b7451eb inherit pub_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b929e4664e4848e71647cd6494790a8 inherit pub_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#a6b929e4664e4848e71647cd6494790a8">writeData</a> (const char *buf, int len)</td></tr>
<tr class="memdesc:a6b929e4664e4848e71647cd6494790a8 inherit pub_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">写入数据  <a href="classlibemb_1_1_socket.html#a6b929e4664e4848e71647cd6494790a8">More...</a><br /></td></tr>
<tr class="separator:a6b929e4664e4848e71647cd6494790a8 inherit pub_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17a82617775b44045f63455cbecf51e4 inherit pub_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#a17a82617775b44045f63455cbecf51e4">getConnection</a> (std::string &amp;peerAddr, <a class="el" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> &amp;peerPort)</td></tr>
<tr class="memdesc:a17a82617775b44045f63455cbecf51e4 inherit pub_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取连接(获取对端地址和端口)  <a href="classlibemb_1_1_socket.html#a17a82617775b44045f63455cbecf51e4">More...</a><br /></td></tr>
<tr class="separator:a17a82617775b44045f63455cbecf51e4 inherit pub_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a701a6b1d84bfc872a4a9bc57c5005e6b inherit pub_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#a701a6b1d84bfc872a4a9bc57c5005e6b">isAlive</a> ()</td></tr>
<tr class="memdesc:a701a6b1d84bfc872a4a9bc57c5005e6b inherit pub_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断端口是否活动  <a href="classlibemb_1_1_socket.html#a701a6b1d84bfc872a4a9bc57c5005e6b">More...</a><br /></td></tr>
<tr class="separator:a701a6b1d84bfc872a4a9bc57c5005e6b inherit pub_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82bea326e166ec56d8e2d8f3613a2285 inherit pub_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#a82bea326e166ec56d8e2d8f3613a2285">fd</a> ()</td></tr>
<tr class="memdesc:a82bea326e166ec56d8e2d8f3613a2285 inherit pub_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取端口fd  <a href="classlibemb_1_1_socket.html#a82bea326e166ec56d8e2d8f3613a2285">More...</a><br /></td></tr>
<tr class="separator:a82bea326e166ec56d8e2d8f3613a2285 inherit pub_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39054e054af1de05a02f4d460298f4d6 inherit pub_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#a39054e054af1de05a02f4d460298f4d6">fdopen</a> (int <a class="el" href="classlibemb_1_1_socket.html#a82bea326e166ec56d8e2d8f3613a2285">fd</a>)</td></tr>
<tr class="memdesc:a39054e054af1de05a02f4d460298f4d6 inherit pub_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过fd打开端口  <a href="classlibemb_1_1_socket.html#a39054e054af1de05a02f4d460298f4d6">More...</a><br /></td></tr>
<tr class="separator:a39054e054af1de05a02f4d460298f4d6 inherit pub_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classlibemb_1_1_socket"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classlibemb_1_1_socket')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classlibemb_1_1_socket.html">libemb::Socket</a></td></tr>
<tr class="memitem:aa3bb309e51bff6547c035e0d6b7c3e6a inherit pro_methods_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_socket.html#aa3bb309e51bff6547c035e0d6b7c3e6a">bindPort</a> (<a class="el" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a> localPort, std::string localAddr=&quot;&quot;)</td></tr>
<tr class="memdesc:aa3bb309e51bff6547c035e0d6b7c3e6a inherit pro_methods_classlibemb_1_1_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">绑定socket到指定IP地址的端口上  <a href="classlibemb_1_1_socket.html#aa3bb309e51bff6547c035e0d6b7c3e6a">More...</a><br /></td></tr>
<tr class="separator:aa3bb309e51bff6547c035e0d6b7c3e6a inherit pro_methods_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classlibemb_1_1_socket"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classlibemb_1_1_socket')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classlibemb_1_1_socket.html">libemb::Socket</a></td></tr>
<tr class="memitem:a83e94aa9166cab327136e980d8ce7e12 inherit pro_attribs_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top"><a id="a83e94aa9166cab327136e980d8ce7e12"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_peerAddr</b> {&quot;&quot;}</td></tr>
<tr class="separator:a83e94aa9166cab327136e980d8ce7e12 inherit pro_attribs_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22355ff0255fda5fa1f850a04ed7c33b inherit pro_attribs_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top"><a id="a22355ff0255fda5fa1f850a04ed7c33b"></a>
<a class="el" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_peerPort</b> {0}</td></tr>
<tr class="separator:a22355ff0255fda5fa1f850a04ed7c33b inherit pro_attribs_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e519f10eb0b8891ebc88408e6b4dac0 inherit pro_attribs_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top"><a id="a2e519f10eb0b8891ebc88408e6b4dac0"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>m_sockfd</b> {-1}</td></tr>
<tr class="separator:a2e519f10eb0b8891ebc88408e6b4dac0 inherit pro_attribs_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96cf5d701a0bd44ba6173c5c565ee36a inherit pro_attribs_classlibemb_1_1_socket"><td class="memItemLeft" align="right" valign="top"><a id="a96cf5d701a0bd44ba6173c5c565ee36a"></a>
struct sockaddr_in&#160;</td><td class="memItemRight" valign="bottom"><b>m_localSockAddr</b></td></tr>
<tr class="separator:a96cf5d701a0bd44ba6173c5c565ee36a inherit pro_attribs_classlibemb_1_1_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>CAN套接字 </p>
<dl class="section note"><dt>Note</dt><dd>仅实现数据收发功能,对于CAN接口的配置请使用libsocketcan开源库 </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="af29500cf81996e67ceaf210fa80c4e33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af29500cf81996e67ceaf210fa80c4e33">&#9670;&nbsp;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::SocketCAN::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>关闭套接字 </p>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

<p>Reimplemented from <a class="el" href="classlibemb_1_1_socket.html#abe56fbd2d9b7e679a2fa123d3477d541">libemb::Socket</a>.</p>

</div>
</div>
<a id="a96672c6ab59aa802b89dec841e06e3cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96672c6ab59aa802b89dec841e06e3cf">&#9670;&nbsp;</a></span>interface()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::SocketCAN::interface </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取接口名称 </p>
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>

</div>
</div>
<a id="a9d22e63de72acc671b452f13890471bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d22e63de72acc671b452f13890471bf">&#9670;&nbsp;</a></span>open()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::SocketCAN::open </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>canName</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#aebf3b8d3c22313714b07d595cc3effac">uint16</a>&#160;</td>
          <td class="paramname"><em>localPort</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开套接字 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">canName</td><td></td></tr>
    <tr><td class="paramname">localPort</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

<p>Implements <a class="el" href="classlibemb_1_1_socket.html#a66ff2090729e8c677b9b74a8109f5c5e">libemb::Socket</a>.</p>

</div>
</div>
<a id="a96f512a12482408448c8c7d6dfbbc5d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96f512a12482408448c8c7d6dfbbc5d3">&#9670;&nbsp;</a></span>readFrame()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::SocketCAN::readFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;&#160;</td>
          <td class="paramname"><em>canFrame</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取帧 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">canFrame</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="a32a48b875a74cf0571f8d3a841a0271b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32a48b875a74cf0571f8d3a841a0271b">&#9670;&nbsp;</a></span>recvFrame()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::SocketCAN::recvFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;&#160;</td>
          <td class="paramname"><em>canFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>usTimeout</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>接收帧 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">canFrame</td><td></td></tr>
    <tr><td class="paramname">usTimeout</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="acd41e727984c489b7e401e3f8cffeba5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd41e727984c489b7e401e3f8cffeba5">&#9670;&nbsp;</a></span>sendFrame()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::SocketCAN::sendFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;&#160;</td>
          <td class="paramname"><em>canFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>usTimeout</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>发送帧 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">canFrame</td><td></td></tr>
    <tr><td class="paramname">usTimeout</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="a086ee3480de9f5d0cf8bc3cf93ffb676"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a086ee3480de9f5d0cf8bc3cf93ffb676">&#9670;&nbsp;</a></span>writeFrame()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::SocketCAN::writeFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_c_a_n_frame.html">CANFrame</a> &amp;&#160;</td>
          <td class="paramname"><em>canFrame</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>写入帧 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">canFrame</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_socket_8h_source.html">Socket.h</a></li>
<li>src/Socket.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
